package com.album.task;

import android.content.Context;

import com.album.http.HttpRequest;
import com.album.utils.Config;

public class ModifyImagePsdTask extends Task{
	private String TAG = "AddFriendTask";
	private Context ctx;
	private ICallBack callBack;
	private String username;
	private int picPassword;
	
	public ModifyImagePsdTask(Context ctx,String username,int picPassword,ICallBack resTask){
		this.ctx = ctx;
		this.callBack = resTask;
		this.username = username;
		this.picPassword = picPassword;
	}
	public String setRequest(){
		String strUrl =Config.TyHttp + Config.TyPicHttp+
		"modifpwd?passport="+username+"&password="+picPassword;
		//String http ="http://59.36.102.177:55520" +
		//"/interface/picmanage.jsp/modifpwd?passport=XXXX&password=XXX";
		String jsonString = HttpRequest.sendDataPost(ctx,strUrl, null,callBack);
		return jsonString;
	}
	@Override
	public void doTask(Task thread){
		Thread t = new Thread(thread);
		t.start();
	}
	@Override
	public void run() {
		//返回数据
		try {
			String strRsp = setRequest();
			callBack.CallBack(strRsp);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}


